1. Field of Use
This invention relates to digital computer systems and more particularly to a method and apparatus for efficiently tracing the flow of program instructions as they are being executed by a computer system.
2. Prior Art
It has been found that the use of a trace procedure facilitates diagnosis of failures within a data processing system. Generally, a trace provides a listing of the conditions of various registers, control and status indicators at predetermined times during the execution of the program, as for example, at the completion of execution of each instruction or after a predetermined number of cycles during the execution of a particular instruction.
Program traces have been implemented in a number of ways. One technique has employed simulation programs for interpreting the instructions of a program being traced and simulating the hardware of the data processing system. This technique is exceedingly slow and the more complex the system, the longer the tracing operation becomes.
Another technique involves inserting each of the instructions to be traced in a program so that each instruction is followed by a group of special instructions which are operative to record and print out the flow of the program. A further technique concerns the tracing of a computer program during selected program procedures. Each program procedure contains a number of different instructions which in sequence control the operation of the system. Each procedure has associated with it a program control word which is interrogated whenever there is an entry into the program procedure. At least one bit in the program control word is used to indicate whether or not the procedure is to operate in a trace mode in which the completion of each operation causes entry into an interrupt procedure for recording the flow of the program. It has been found that the techniques mentioned are time consuming and involve additional instructions. The last procedure mentioned is limited to tracing program instructions associated with different procedures.
Accordingly, it is a primary object of the present invention to provide an arrangement for efficiently tracing the flow of instructions within a program.
It is a specific object of the present invention to provide an arrangement for tracing the execution of program instructions processed by a system when operated in other than its natural mode of operation.